home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 February: Technology Seed / Mac Tech Seed Feb '97.toast / ODF Release 3 / ODF-Interest Archive / December 96 / Handling RequestFrameShape du.1 < prev    next >
Encoding:
Internet Message Format  |  1996-12-10  |  1.7 KB  |  [TEXT/ttxt]

  1. Subject:     Handling RequestFrameShape during a clone
  2. Sent:        12/10/96 11:17 AM
  3. Received:    12/10/96 11:43 AM
  4. From:        Rob Cope, rob@eclipseservices.com
  5. Reply-To:    ODF Interest, ODF-Interest@CILabs.ORG
  6. To:          OpenDoc Development Framework Discussion List, ODF-Interest@CILabs.
  7.  
  8. (This message is mostly about ODF based parts, but was posted to the OpenDoc list since it also deals with when parts should call RequestEmbeddedFrame)
  9.  
  10. I ran into an interesting problem using the Apple Image Viewer from the Essential Live Objects folder August DR 6 CD.  Try this:
  11.  
  12. 1) Open ODF Draw (any version), draw a shape
  13. 2) Embed a picture using the Apple Image Viewer
  14. 3) Select both the Image Viewer frame and the shape you drew in step 1
  15. 4) Choose Copy
  16. 5) Choose Paste
  17. 6) Land in debugger with an assert from FW_CODPart::RequestFrameShape
  18.  
  19. The assertion is caused by the fact that the part cannot find the proxy for the embedded frame that is requesting a new shape.  The reason it can't find the proxy is because the Apple Image Viewer is requesting a frame shape before ODF has had a chance to create the proxy frame.  To illustrate, here is the code from FW_MProxy::PrivPostClone:
  20.  
  21. void FW_MProxy::PrivPostClone(Environment* ev, FW_CCloneInfo* cloneInfo) 
  22. {
  23.  [...snip...]
  24.     // ----- Now we can embed it -----    
  25.     FW_CAcquiredODShape aqFrameShape = aqODEmbeddedFrame->AcquireFrameShape(ev, NULL);
  26.     FW_CAcquiredODPart aqPart = aqODEmbeddedFrame->AcquirePart(ev);
  27.     
  28.     fPresentation->Embed(ev,  [...snip...]
  29.  
  30.  
  31. The call to fPresentation->Embed is what causes the the proxy frame to be added to the proxy.  However, the call to aqODEmbeddedFrame->AcquirePart(ev) is where RequestFrameShape is being called by the Apple Image Viewer